/*
 * File: J_rl_T04_q2.c
 *
 * MATLAB Coder version            : 5.2
 * C/C++ source code generated on  : 22-Apr-2025 04:14:49
 */

/* Include Files */
#include "J_rl_T04_q2.h"
#include <math.h>

/* Function Definitions */
/*
 * J_RL_T04_Q2
 *     U42 = J_RL_T04_Q2(IN1,IN2)
 *
 * Arguments    : const double in1[4]
 *                const double in2[4]
 *                double u42[16]
 * Return Type  : void
 */
void J_rl_T04_q2(const double in1[4], const double in2[4], double u42[16])
{
  double t10;
  double t11;
  double t12;
  double t13;
  double t14;
  double t15;
  double t16;
  double t17;
  double t18;
  double t19;
  double t2;
  double t3;
  double t38;
  double t39;
  double t4;
  double t45;
  double t47_tmp;
  double t48;
  double t5;
  double t6;
  double t61;
  double t7;
  double t8;
  double t9;
  /*     This function was generated by the Symbolic Math Toolbox version 8.7.
   */
  /*     21-Apr-2025 11:22:21 */
  t2 = cos(in2[0]);
  t3 = cos(in2[1]);
  t4 = cos(in2[2]);
  t5 = cos(in2[3]);
  t6 = cos(in1[0]);
  t7 = cos(in1[1]);
  t8 = cos(in1[2]);
  t9 = cos(in1[3]);
  t10 = sin(in2[0]);
  t11 = sin(in2[1]);
  t12 = sin(in2[2]);
  t13 = sin(in2[3]);
  t14 = sin(in1[0]);
  t15 = sin(in1[1]);
  t16 = sin(in1[2]);
  t17 = sin(in1[3]);
  t18 = t6 * t7;
  t19 = t6 * t15;
  t38 = t19 + t3 * t7 * t14;
  t39 = t18 + -(t3 * t14 * t15);
  t6 = t3 * t10;
  t61 = t7 * t10;
  t45 = (t2 * t11 * t15 + t61 * t14) + t6 * t19;
  t47_tmp = t2 * t7;
  t7 = (t47_tmp * t11 + t6 * t18) + -(t10 * t14 * t15);
  t6 = t2 * t3;
  t48 = (t47_tmp * t14 + t6 * t19) + -(t10 * t11 * t15);
  t6 = (t61 * t11 + t2 * t14 * t15) + -(t6 * t18);
  t47_tmp = t4 * t16;
  t2 = t8 * t38 + t47_tmp * t39;
  t3 = t4 * t8;
  t61 = t16 * t7 + t3 * t45;
  t19 = t16 * t38 + -(t3 * t39);
  t10 = t8 * t6 + t47_tmp * t48;
  t7 = t8 * t7 + -(t47_tmp * t45);
  t6 = t16 * t6 + -(t3 * t48);
  t47_tmp = t5 * t17;
  t3 = t12 * t13 * t17;
  u42[0] = (-t9 * t2 + t47_tmp * t19) + t3 * t39;
  u42[1] = (-t9 * t10 + t47_tmp * t6) + t3 * t48;
  u42[2] = (t9 * t7 - t47_tmp * t61) + t3 * t45;
  u42[3] = 0.0;
  t47_tmp = t5 * t9;
  t3 = t9 * t12 * t13;
  u42[4] = (t17 * t2 + t47_tmp * t19) + t3 * t39;
  u42[5] = (t17 * t10 + t47_tmp * t6) + t3 * t48;
  u42[6] = (-t17 * t7 - t47_tmp * t61) + t3 * t45;
  u42[7] = 0.0;
  t47_tmp = t5 * t12;
  u42[8] = -t13 * t19 + t47_tmp * t39;
  u42[9] = -t13 * t6 + t47_tmp * t48;
  u42[10] = t13 * t61 + t47_tmp * t45;
  u42[11] = 0.0;
  u42[12] = t12 * t39 * 0.3972;
  u42[13] = t12 * t48 * 0.3972;
  u42[14] = t12 * t45 * 0.3972;
  u42[15] = 0.0;
}

/*
 * File trailer for J_rl_T04_q2.c
 *
 * [EOF]
 */
